<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双向的数据绑定</title>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <input type="text" v-model="name">{{name}} {{age}} {{flag}}
    <hr/>
    <p>插值表达式中调用方法时一定记得加()</p>
    {{sayHi()}}
    <hr/>
    {{[1,2,3,4,5,6][3] }}
    <hr/>
    <p>大括号中间一定记得留个空格</p>
    {{ {name:"李四",age:19} }}
    <hr/>
    {{ {name:"李四",age:19}.name }}
    <hr />
    {{ arr[1] }}
</div>

<script>
    new Vue({
       el:"#app",
       data:{
           name:"芳芳",
           age:18,
           flag:true,
           arr: ["王大","王二","王三"]
       },
        methods:{
            sayHi:function () {
                return "Hello VUE"
            }
        }
    });
</script>
</body>
</html>